<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Ha Anh Son
 * Date: 3/28/13
 * Time: 4:05 PM
 * To change this template use File | Settings | File Templates.
 */
//cach dung tham chieu
$arr = array(1, 2, 3, 4);
foreach ($arr as &$value) {
    $value = $value * 2;
}
var_dump($arr);// $arr is now array(2, 4, 6, 8)
